home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Belgian Amiga Club - ADF Collection
/
BS1 part 47.7z
/
BS1 part 47
/
Aladdin 4D v3.2 Upgrade (1994-04-13)(Adspec Programming)[update disk].7z
/
Aladdin 4D v3.2 Upgrade (1994-04-13)(Adspec Programming)[update disk].adf
/
Program.LZH
/
Fountain.ReadMe
< prev
next >
Wrap
Text File
|
1994-04-14
|
50KB
|
1,009 lines
Tutorials - Fountains
GENERAL:
This section has tutorials on the fountain objects. A specific
discussion of each gadget and its use is presented in the
reference section on fountains. It is suggested that you work
through this tutorial section, referring to the reference section
for each specific feature discussed, if desired. After working
through the tutorials, you may use the reference section
exclusively.
Fountain objects are related to flare objects with various
extensions. Specifically, they allow you to determine a specific
number of flare objects, their initial positioning and how they
behave during an animation. This is an interesting implementation
of a particle system that uses the flare object technology. Using
the flare object technology allows you to work with a particle
system in very quick time and with low memory useage. They can be
used for fireworks, starfields, magic wands, writing, trails,
clouds, and on and on.
WARNING: Fountain objects are not for the weak hearted! This is
a rather extensive implementation. There are capabilities within
capabilities, and all require some thought and learning. In
addition, you can tell the fountain objects how they should
behave before an animation begins, using something called
preroll. This concept is new with the fountains.
WARNING: Fountain objects, like gases, are not limited except for
your memory and patience. When used with understanding, they are
the fastest rendering particle animation system we have seen. You
can, however, ask for an unlimited number of particles. You can
also ask for extremely short lifespans for the particles. This
combination can result in very long rendering times, especially
when preroll is on. RESIST YOUR URGE to ask for large numbers of
particles until you have gained a full understanding of the
fountains. Also, there is no abort on fountain initialization or
render, so if you set up a fountain that will take too long to
render, you will either have to wait until it is done, or reboot
the computer. This is simple to avoid.
Basically, there are three things you can do to cause fountains
to take a long time to render.
1: Use a large image size for the particles. (can also be done by
setting the camera very close)
2: Use a small range for the particle life.
3: Use a large number of particles.
Obviously, if you use a small image size, a large life range, and
a small number of particles, the fountain will render very
quickly.
Further, if you are in the render screens and ask to redraw a
frame of the animation the fountain must be calculated along the
timeline to the time you are asking for, since the particle
positions are dependent on previous particle lifetimes and
positions at their birth. This can take a while based on your
values used in number 2 and 3 above.
As you gain experience with the fountains, you will gain
understanding of just how far you can push these parameters and
still have a rendering time that is short enough for your
purpose.
FIRST LOOK:
Start the program or select "new" if you have been working. Flat
view in the Y axis. Choose the polygon fountain menu item add.
As you can see from the resulting window there are many aspects
of the fountains you can control. The apparent complexity of the
window shows you just how much control you have. In addition,
there are many gadgets here that open further windows for even
greater control. BE PATIENT. Fountains are not a feature for the
light hearted user. They must be understood if you want to get
the powerful results they are capable of.
We will change some of the defaults a little later. Just accept
the window this time. You will see a simple straight line poly (2
points) appear with one end at the current attach point
(currently at the origin).
This poly is the "stem" of the fountain. It is your handle on
the fountain for assigning textures, attribute lists and moving
it around. The first point (point 0) of the stem, now at the
origin, is the source of the particles that are generated by the
fountain.
Select the fountain and choose the polygon menu item attributes.
Add an attribute list. Select control and name it fountain_test.
Select member control and give it an entry color of full yellow
(rgb: 255,255,0) and an exit color of full blue (rgb: 0,0,255).
Do NOT hit match.
NOTE that the color and show flags are the only aspects of the
list used by the fountain.
Accept the windows back to the editor. Since the fountain is
selected, it will use this attribute list. Now with the fountain
selected, choose the polygon menu item textures. Add a texture
list. Select control and name it fountain_test. Select member
control. Click on the SELECT gadget. Change to show bitmaps.
Click the LOAD gadget. Go to the aladdin4d:textures/flares
drawer. Load one of the "star" flares you find there. After the
texture loads, select it and accept the window.
Note that you must select it. If you have selected it properly,
you will see the name of the texture in the member control window
in the lower left corner, with the number of frames and color
depth and size shown.
In the member control window choose the SUGGESTED gadget. Move
the color and strength gadgets to 1.0. Click the MATCH gadget.
Accept the windows back to the editor. The fountain will now use
the flare image you have chosen when it renders.
Now SAVE the drawing as fountain_tut.4d. (It will be very small,
about 3500 bytes.) The following tutorials assume the fountain
exists, and are fairly long. You will probably not finish them at
a single setting. By saving it, you will be able to leave it at
any time, then reload it to continue.
Before we render the fountain, it is important to realize that
fountains are dynamic systems. In other words, they change over
time. Lets see this. Choose the view menu item preview anim.
Change the Number of frames to 180, and from 1 to 180. Accept the
window.
What you see in the preview window on the first frame is the
fountain stem. It is visible in the preview and editor, but will
not be visible in the fully rendered images. As the animation
goes along, you will see particles emerge from the fountain stem
first point. It is the fountain source. They emerge in a random
fashion and move along a straight line away from the source. They
live a little while, then die. When one dies, a new one is born
at the source to replace it. Remember, this is happening in full
3D. Some particles are coming straight out toward you and some
are going away from you. The particles are moving inside a
virtual sphere in space. After watching this a while so you
understand it, hit the escape key to return to the editor.
I'm sure you want to see what a rendered fountain looks like
before we talk about controlling the particles movement, so let's
do that. We already have a texture on this one and an attribute
list, so choose the view menu item render options. Turn ON the
light and fill. They are required to render fountains. Select the
"set screen mode" gadget. If you are using a display enhancer,
you may choose it, or you may use standard ham or ham8. Fountains
are objects of much subtlety when rendered, so the best display
mode you have is the one you should use. Accept the windows back
to the editor.
Now choose the view menu item render. The window opens ready for
frame 1. Remember the preview? Frame 1 has particles only at the
source point. If you render frame 1, you can expect to see
particles only at this point. Another frame may be more
interesting. Change the number to 60, and press the return key.
The render screen you shose opens with a wait pointer.
The program is initializing the fountain and then updating the
fountain to the frame you requested. You cannot abort the render
during this phase. With the default fountain, this takes very
little time.
Then the racetrack window opens to update you on the progress of
the imaging of the fountain. This is an invisible operation, you
can't see the image being formed, so the racetrack window keeps
you posted on its progress. You cannot abort the render during
this phase, either.
Once the racetrack window closes, the final compositing will take
place. If you had any polygons at this point, they would be
rendered with the fountains being composited into the final
image. You will see the fountain particles being rendered with
the star flare image you chose. Notice that the fountain stem
does not render. At first you will not see any of the image. The
particles are only in a small area in the center of the screen.
As the scanline render reaches the area, you will see the
particles appear.
This is not a very impressive image. If you call your family in
to look at it, their yawn will be more impressive than the image.
Don't worry, we will get to the impressive stuff later. Right
now, we are just getting a basic understanding of the mechanics
involved in rendering fountains. Again, be patient and thorough.
The fountains, like the flares, use a type of transparency
mapping when they are composited. The bitmap used for the image
is mostly black. Where it is black the particle is completely
transparent. As the "luma", or highest color component of the
bitmap increases, the particle gains density.
Return to the editor. Let's begin a fairly indepth look at what
controls you will ordinarily use over the fountains.
In normal use you will want to control:
1. particle number
2. particle life
3. particle direction
4. particle distance
Other things you will want to control for some drawings:
5. particle rotation (in space)
6. particle drift
7. particle placement with paths
8. fountain preroll
And for rendering, you will want to control:
9. particle image
10. particle size
11. particle color
12. particle strength
13. particle image rotation
14. particle obscurring
Let's look at the first group.
1. PARTICLE NUMBER:
Select the fountain (only) and select the polygon fountain menu
subitem alter, or use the alt Y keys. The fountain control
window opens. Find the gadgets labeled Number Particles on the
right side. There are two, an entry and exit value. Right now
they read 60, 60. You may change them to any number. Typical use
is in the 10 to 300 range. Whatever number you enter, you are
telling the fountain to maintain this count. As a particle
expires, a new one will be created to replace it so the count
always remains at the value you are requesting. This is simple
and obvious. Instead of entering a few values and looking at
them, let's do something more interesting. Change the entry side
to a 1, and the exit side to a 200. Accept to the editor and
preview it. Notice that at the entry to the animation, the
fountain generates only a few particles, and at the end, far
more. The change in particles is linear. It may be more
interesting to have the change be non-linear. In the editor,
alter the fountain again. Notice the cspline gadget beside the
number particles gadgets. Click it. The cspline select window
opens. There are none at this time. Click add, then control. You
could do anything here you wanted. Click LOAD and load the
periodic_eases.csp cspline from your csplines directory. If you
have been using csplines, you know intuitively what this will do.
Time runs from left to right in the anim. The entry value is at
the bottom and the exit value is at the top. So this will cause
the fountain to be emitting 1 particle at frame 1, and build to
200 in a nonlinear fashion, then at the middle of the anim, start
reducing the count, again nonlinearly, and end with the count at
1 at the end of the anim. Preview it to verify this. You can use
the cspline to have absolute control over the number of particles
occuring at any time in the animation and their rate of change.
2. PARTICLE LIFE:
As you watch, you realize that a particle is born at the source,
then moves to the outside of some random point on a virtual
sphere. Only a few actually make it to the outside. This takes
about 30% of the animation for them. The others never live long
enough to get there. Lets change this.
Alter the fountain. Find the gadgets labeled Life in the right
side gadgets. Here you find two sets of entry/exit gadgets, one
labeled Max and one Min. Now think a second. The value of the
left gadgets is the value the fountain's particles will have if
they are born at frame 1. The value of the right gadgets is the
value a particle born at the last frame of the animation will
have. As the animation proceeds, the values are averaged so a
particle born at 0.5 of the animation, or the middle frame, will
get a lifetime halfway between the two values.
Now, why is there a Max and a Min? The two values allow you to
set a range of life. The Max and Min are limits. A particle will
get a random value between the the limits. If you set a max/min
of 0.3 and 0.1 at entry and exit, a particle will get a life that
somewhere between 0.3 and 0.1 no matter when it is born. If you
set different values in the exit, a particle's life will change
depending on when it is born.
Let's try a few changes. First lets make the number of particles
not change so it is easier to see the effect of the life. Change
the entry/exit particle number back to 60/60. Click the cspline
for the particle number, and free it. This is sometimes
important, even if there is no change, so it is a good habit to
get into.
Now for the life values. To make this text easier to read, let's
mention the values as a group of four values, entry max/min and
exit max/min. So right now you see values of 0.3/0.01 0.3/0.01.
Change this to 0.5/0.01 0.5/0.01 and preview. Notice that the
particles live longer just like you expected. Alter the fountain
and change the life to 1.0/0.5 1.0/0.5 and preview. Watch this
one carefully. An initial burst occurs. The particles that are
born have a life between 0.5 and 1.0. There are 60 of them. Now
no new particles are born until one dies since the particle
number is not changing. When the animation is 0.5 done, you see
some of them die and at the same time, new ones are born to
replace them and maintain the particle count. These new ones also
have a life between 0.5 and 1.0. Since there is only 0.5 of the
animation left, none of these will ever die. As the animation
goes beyond 0.5, you see other particles die and be replaced.
These are the particles that were initially born with a life set
between 0.5 and 1.0. Watch this until you understand what is
happening.
Alter the fountain again and enter values of 0.1/0.1 0.1/0.1 and
preview. Notice that the particles live 0.1 of the animation The
max/min limits being the same mean all particles will have the
same life. At 0.1 of the animation, the initial 60 particles will
die at the same time and be replaced by 60 more, again all with a
life of 0.1. Is this what you expected? While you have the life
set this way, change the particle number entry/exit to 0/60 and
preview. Notice that all particles are reaching the edge of the
virtual sphere and travel at the same "speed". This is a useful
one for many of your drawings.
You may try different values for the life and preview the
results. As you do, there are four main things to notice and
remember.
a: A particle cannot be born until the number changes or an old
one dies.
b: The distance a particle travels is related to its lifetime
c: the total distance traveled is set by the longest life
possible.
d: DO NOT use values of 0.0/0.0 0.0/0.0. These are not clamped.
You will end up with an animation that shows no particles as
expected. Also as expected, each frame will take longer and
longer to calculate and could result in a crash of the system. In
general use, do not use a value of less than 0.001.
One more point of interest. The particle life values can range
from 0.0 up. There is no upper limit. This is because if you
later use preroll, you may want values up to 2.0. Values above
2.0 are not useful at this time, but in the future may have
special meanings.
WARNING: The smaller the range of life between the limits you set
for max/min, the longer the fountain will take to calculate. Very
small values here, especially with large numbers of particles,
can require long periods of time to calculate. There is no abort
during the calculations for reasons of efficiency. Use discretion
in setting your life values to very low values, especially if you
are using a larger number of particles.
3. PARTICLE DIRECTION:
The fountain you have been experimenting with has created a
virtual sphere with its particles. Let's look at altering this.
Alter the fountain. Use particle number of 60/60 with no cspline.
Set the life values to their defaults of 0.3/0.01 0.3/0.01, again
with no cspline. Now find the area of gadgets labeled Direction.
Notice that there are three directions, X,Y and Z. Notice that
each has entry/exit max/min values. You should be able to guess
how these are used. Let's take the Y direction for an example.
Right now it has values of 180.0/0.0 180.0/0.0. This means a
particle when it is born (whenever it is born, since these don't
change) has a "y direction" of between 180 and 0. So just what
does this mean?
It is easier to see than to read, so let's look at it. Change the
y direction values to 180.0/0.0 0.0/0.0. Preview the animation.
Notice that the direction of the particle is fixed for the
particle at the time it is born. As the animation moves along,
the general tendency of the fountain is to move from a sphere to
a single verticle line. This will be much easier to see if we get
rid of the z direction components. Change the Z direction values
to 0.0/0.0 0.0/0.0 and preview it again. You now only have the
particles in a flat plane. Do you understand what is happening?
Alter the fountain and enter Y values of 90.0/90/0 180.0/0.0 and
preview. This one should firm up your understanding. At frame 1,
the particles have a direction of 90 degrees on the y. All
particles have this direction so straight line is being emitted.
As the animation progresses, they get a direction that is between
two values that change up to 180.0/0.0 at the last frame. The
straight line opens to a 180 degree fan shape.
There is a tremendous amount of control here. You may experiment
with the direction values to see what types of fountains you can
make. Some suggested values that are of particular interest are,
given in entry/exit max/min on the x,y,z:
sphere:
x: 0.0/0.0 0.0/0.0
y: 180.0/0.0 180.0/0.0
z: 360.0/0.0 360.0/0.0
hemisphere:
x: 0.0/0.0 0.0/0.0
y: 90.0/0.0 90.0/0.0
z: 360.0/0.0 360.0/0.0
quadrantsphere:
x: 0.0/0.0 0.0/0.0
y: 90.0/0.0 90.0/0.0
z: 90.0/0.0 90.0/0.0
disk in xy plane:
x: 0.0/0.0 0.0/0.0
y: 90.0/90.0 90.0/90.0
z: 360.0/0.0 360.0/0.0
Obviously, you can achieve these in different combinations. For
instance a sphere can also be achieved by using 360.0/0 on the y
values. It will be significantly different than the one listed
and yet occupy the same area. Notice that if you use a value of
3600.0 instead of 360.0 for the z direction you still get a
sphere, but again, it is quite a different distribution.
There are many other sets that are useful. As you gain
experience, you will be able to set the values you want easily
and intuitively.
An interesting note here is: What is the direction when values
are all at 0.0? This is the default direction. If you try to
preview it, you will not see the particles. This is because they
are moving straight up. That is where the stem is, so they are
obscurred by the stem in the preview. You would see them in the
render.
There is a related direction control. It is called ALIGN and is a
boolean gadget in the upper right area of the control window. It
is normally off. Let's look at it when it is on. Alter the
fountain to be a disk in the xy plane with the values shown
above. If you are flat viewed in the Y axis and preview this you
will see a straight line because you are looking at the disk edge
on, so rotate your view a little on the x axis by using the 7 key
on the number pad, then the 8 key to stop the rotation. Use a
view angle of about 105,180,0 as read out at the top of the tool
box. This way you are looking slightly down on the disk. Preview
to make sure you have a disk.
Return to the editor. Select the point at the top of the fountain
stem. Move it a little to the right, so the stem makes about a 20
degree angle with verticle. Preview this again. Notice that there
is no change in the disk. Now alter the fountain and depress the
ALIGN gadget and preview. Notice that the disk is now rotated at
about a 20 degree angle. This ability is not generally used, as
you can achieve the same results by assigning the fountain to a
path, and then you can change the results over time. But for some
cases, this is an easier method, so it has been included.
There is also a related direction control. It is called Dir
Linea(r). If this is off, as is the default, the particles
direction is random between the limits you set. If on, the
particles are ordered by their creation between the limits you
set. For instance, if you have the Y direction set to a max/min
of 360.0,0.0 and have 360 particles, with dir linea off, the
particles are given a Y direction random between 360 and 0 when
they are born. Particle 1 may get 247.6 and particle 2 may get
17.9, etc. If dir linea is on, particle 1 would get 1 and
particle 2 would get 2, etc. If you used 180 particles, particle
1 would get 2 and particle 2 would get 4, etc. This gives you the
ability to get perfectly spaced circles of particles easily by
using particles of the same life at a fixed distance.
Later, under particle placement, we will explore using paths to
control the fountains. There, you will see some exquisite methods
of control of particle position. Other related controls are the
drift, which we will look at later, and the distance, which we
will look at now.
4: PARTICLE DISTANCE:
There are extensive controls over the distance from the source
that the particle is created at and moves to. Alter the fountain
and turn the ALIGN off. Find the gadgets in the lower left column
labeled Distance. There are four sets, Orig(ination) max
entry/exit, Orig min entry/exit and Dest(ination) max entry/exit,
Dest min entry/exit. The values in the Orig gadgets control the
particle distance when it is born, and the values in the Dest
gadgets control particle distance when it dies. We will list the
values as Orig max/min, Dest max/min to make reading the text
clearer. When a fountain is created, these values are set to
0.0/0.0, 0.0/0.0, 10000.0/5000.0, 10000.0/5000.0. This means all
particles will be born at the source and have a destination
between 5000 and 10000 units. You are unlimited in these numbers,
they may be any number, including negative values.
Let's change them a few times to get an idea of the power here.
Let's do an expanding ring. Change the Orig values to
0.0/25000.0, 0.0/25000.0, and the Dest values to 0.0/0.0,
0.0/0.0. Preview this. Notice that during the animation, the
birth position of the particles expands outward. The destination
position is maintained at the source, so as the "ring" expands,
the particles always head toward the source. Notice that most of
the particles do not get there. The default fountain has the
particles travel at a fixed "speed". If the longest lived
particle is 0.3, and the largest distance to travel is 25000,
only a particle that lives 0.3 will travel 25000. A particle that
lives half as long will travel only half as far. You can toggle
the fountain so that all particles will travel their assigned
distance, no matter how short they live.
Find the gadget in the upper right of the window called "Motion".
By default it reads Constant. Click it and it will change to
relative. Preview this. Notice that all the particles now reach
the source, with a resulting variation in "speed".
There is also a control Dest Type just below the distance gadgets
which is listed. It is a boolean and can be either Relative or
Constant. If relative, the Dest values are absolute distances
from the fountain source. If constant, the values are absolute
distances from the particle's position when it is born. Change it
to Constant and preview. Is this what you expected? Notice that
the Dest values are all 0. When in relative, this means the
particles will all move toward this distance from the source, ie,
to the source in this case. When in constant, this means the
particles will move this amount from their birth positions. Since
it is 0, they do not move from their birth position. (If you vary
the strength of the particle so they are bright when first born
and fade off, this can be quite useful.)
Another related option is called Disp(lay). It is a boolean in
the upper right part of the window. If Random, as is the default,
the program will try to insure that there are no recognizable
patterns created by the particles. If Pattern the program allows
recognizable patterns to be created. The patterns are most
obvious when creating a 2D disk type of fountain, but can still
be perceived with full 3D fountains.
To see the difference, change the distance Orig variables to all
0.0. Change the distance Dest vars to 10000.0/10000.0,
10000.0/10000.0. Use a particle number of 60/60. Use life values
of 0.3/0.01, 0.3/0.01. Now use directions to set up a disk in the
xy plane as described above. Make the Motion constant, and the
dest type relative. Preview this with the disp set to random,
then change it to pattern and preview it. The patterning here is
obvious because of the distance min/max being the same. Changing
this will make less obvious patterns. You may want to use the 7
key to rotate your view for a more advantageous view position in
the preview.
Alter the fountain again and look at the cspline gadgets beside
the distance gadgets. Notice that there is a cspline gadget
beside the four Orig gadgets, and one beside the four Dest
gadgets. These control the rate of change between the values you
have in the entry/exit sides of these gadgets. One cspline
controls both the max/min of each.
Notice that there is a third cspline gadget between these two,
and slightly offset to the right. This is the INDIVIDUAL PARTICLE
cspline gadget for distance. If you look around the window at the
other groups of cspline gadgets, you will see this pattern for
some of the other controls as well. The individual particle
cspline gadget allows you to control the behavior of each
particle during its life! For distance, for instance, if you use
the periodic_eases cspline you have loaded, each particle will
move from its entry position to its exit position, then back
again.
You will want to try many variations on the distance variables,
both with constant and relative motion and dest types, with
csplines, pattern displays, varying the particle number, etc. As
you experiment, you will probably find several setups that you
like. You may want to save a few of these, but for now, the
important thing is to experiment.
Now let's look at the second group. The first group were things
you will want to control every time you use a fountain. These are
things you will want to use occasionally.
5: PARTICLE ROTATION:
As you have discovered, you can change the direction a particle
takes when it is born, and you can change the distance of the
particle is born and when it dies. Particle rotation, in effect
allows you to change the "direction" of the particle over its
life.
Locate the gadgets in the right column labeled Rotation. Just
like the direction controls, there are three directions, X,Y and
Z. Notice that each has entry/exit max/min values. You should be
able to guess how these are used. Let's take the Y direction for
an example. Right now it has values of 0.0/0.0 0.0/0.0. This
means a particle will not rotate around the Y axis during its
life. Let's change this to see the result.
You have probably been changing many values in the fountain, so
let's start with a new one. Don't use the "new" menu item. If you
do, you have to load your texture and attributes lists again.
Instead, let's create a new one in a new space. Set the drawing
with a RMB click in the editor window. Click the space control
gadgets (bottom of tool box) with a RMB. The space control window
opens. Click the Create gadget. You have a new space. Flat view
in the Y axis. Use the Polygon fountain menu subitem Add. The
fountain control window opens with all the defaults in place. Now
change the direction values so the x and z values are all 0.0.
Change the Y direction values so they are a max/min of 360.0/0.0,
both entry and exit. This will create a flat disk that is easily
seen from a flat Y view. Preview this. (If you rotate around the
z axis in the preview using the 1 and 3 keys, this becomes
apparent.)
Now alter the fountain. Change the rotation Y values to
360.0/360.0, 360.0/360.0. Preview this. Notice that all the
particles now rotate 360 degrees around the Y. Alter the fountain
and change the values to 360.0/0.0, 360.0/0.0. (Remember, these
are max/min values.) Preview this. Notice that the particles are
now rotating with randomly assigned amounts between the max/min
limits you have entered.
Change the values back to 360.0/360.0, 360.0/360.0. Locate the
gadget called Rot Type. It now reads Age. Click it and it will
change to Dist. Preview this and you will see that the amount of
rotation the particle gets is now related to its distance from
the source. As a particle moves farther from the source, its
rotation is decreased. There is also a value you can enter called
the Dist Type Factor. It defaults to 2.0. Changing this to a
lower number lessens the amount of decrease. A higher number
increases the decrease. Try values ranging from 0.0 to 5.0 or so
and the effect should be obvious. The routines are set up so
positive numbers give intuitive results. You can try negative
numbers if you want, but the results are not intuitive.
Notice that there is also an angle execution order gadget, just
like on the path control window. Its purpose, again, like with a
path, is to allow you to specify the order in which the x,y,z
rotations will occur.
Some results you can achieve with rotation are not at all
apparent at first glance. Let's do a quick example to illustrate.
Change the direction variables so they are all 0.0. As you have
found out, this means the particles will all go straight up the
z, along the stem in this case. Now use y rotation values of
360.0/360.0, 360.0/360.0 and preview. Use the periodic_eases
cspline you have loaded on the INDIVIDUAL PARTICLE cspline (the
one offset just a little to the right) and preview this with the
Rot Type set to Age, then with it set to Dist. If you take a few
moments to think about what you are seeing, it should become
obvious that what you are seeing is what you have specified. Some
very interesting particle behaviors can be achieved using
rotations.
6: PARTICLE DRIFT:
You can specify a global "drift" for the fountain. All particles
created by the fountain will be affected by this. It can be used
to simulate "wind" and "gravity". Let's try it.
Delete the fountain you have in space 2. Add a new fountain. In
the control window, find the gadgets labeled Drift at the bottom
right of the window. There are three, one each for x, y and z.
They are by default set to 0. Change the z drift to 20000.
Preview the anim. You know that a fountain at its default
occupies a spherical space. This is obviously different. The
particles are being moved to their position for the current
frame, then the amount of drift they have experienced by that
frame is added to their position. The result is what you see.
Alter the fountain again and find the gadgets in the right column
labeled DriftFac(tor). Here you see the Orig max/min and Dest
max/min you have experienced with the distance values. The values
represent a multiplier of the amount of drift you have specified.
In this case, 20000 on the Z. The default settings tell the
program to apply 0 percent of the drift at the particle's birth
and 1 (or 100 percent) of the drift at the particles death. You
can use any combination of values you desire for the multipliers,
including negative numbers. If you use different numbers for the
max/min values, the program will distribute values at random
between the values for the particles as they are created.
Notice that you have three cspline controls here. Their use is
identical to that you learned for distance. Click on the
individual particle cspline and use the periodic_eases you have
loaded. Preview the anim. Do you see that the behavior of the
particles directly reflects the cspline? Alter the cspline again
and change the individual cspline. Since you are not using the
cspline that already exists, called Cspline1, select it. Control
it and move the left control point to the bottom, half way
across. Move the right control point to the right, half way down.
This is a "slow to fast" type of cspline. Accept back to the
editor and preview it. Notice that this is a pretty good
simulation of gravity's acceleration. You can also use the drift
to "decay" a pattern that was drawn by a fountain under path
control as you will find out in the next section.
7: PARTICLE PLACEMENT WITH PATHS
This is one of the most interesting, and exciting aspects of the
fountains. You can move the fountains with paths, and control
whether the particles move along with the path, or just are
created at the point the path would be when they are born. This
means you can do magic wands, comets, or even write your name
with a fountain! We will illustrate with a few simple examples.
Use the fountain you have been working with using the drift. It
should be nearly default, except the drift should be 20000 on the
z, the driftfac values should be 0.0 in all the orig gadgets and
1.0 in all the dest gadgets. Use an individual cspline on the
drift factors that is a "slow to fast" type. Now select the tools
menu item make arc. Use 360 degrees, 12 segments, with one radius
of 10000 units. Select the "circle" and use the paths menu item
make poly a path. Turn ON the movement status and last segment.
Also make the exit rotation value on the Y axis 360 and use 3
cycles on the Y rotation. Accept this. Now select the fountain
and assign it to the path. Preview the anim. As you can see, this
is a perfect "magic wand" simulation. The particles obey the
path's instructions at the time of their birth, then ignore them
from then on.
Alter the fountain again. Find the gadget labeled Move Type at
the top right of the window. It reads independent. Change it to
read grouped and preview. Now the particles obey the path
instructions over their life. This is useful if you want to move
a fountain along a path, keeping the relationship of the
particles to each other consistent.
Turn the move type back to independent. Set the particle number
to entry/exit values of 0/200. Change the distance values so they
are all 0.0. Preview the anim to see the results.
Get rid of the drift by changing the drift x,y,z to all 0.0.
(Also free the cspline you have in use for the drift. It is not
necessary, but is just good housekeeping.) Change the life values
to 1.0/1.0, 1.0/1.0. Preview to see the results. Do you
understand what is happening here? Since the particles are set to
live for the length of the animation, they never expire. Since
they are created evenly over the length of the animation, they
are deposited along the path described by the fountain's
movement. This is a kind of 3D spiragraph.
There are literally an infinite number of effects you can get
with path control over the fountain particle placement, and
you are probably wanting to play with all types of paths and
values for the fountain. We encourage you to do just that, but
first, move on to the preroll section. It is directly related to
the fountain you now have in the drawing.
8: FOUNTAIN PREROLL:
With the fountain set as in the previous example, you notice that
the particles are created from start to finish along the path.
What if you wanted the pattern created to exist at the beginning
of the anim? That is what the preroll can do.
Alter the fountain. At the upper right, find the gadget called
PreRoll. Click it with the LMB. The window that opens is the
preroll control window. Turn ON preroll. There is a gadget
labeled Assi(gn) PRPath (preroll path). Click it with the LMB.
The window goes away and you are prompted to choose a path.
Select the circular path. The window opens again. There are
several other controls you can use here. We won't use them now.
You can read about them individually in the reference section as
your understanding of the fountains increases and you have a need
for them. Accept the window.
Now click the cspline for the particle number. Add a cspline and
control it. Adjust it so it is a straight line across the top of
the cspline editor window. Accept back to the editor and preview.
Now it is important to discuss what is happening. It may appear
to you that the pattern was made before the animation began, and
is being sustained through the animation, but this is not
entirely true. What is actually happening is the preroll runs the
fountain through a time range from 0.0 to 1.0 BEFORE THE ANIM
BEGINS. This sets the particles into the pattern you see. Now as
the animation begins, the particles have the life values they
received in preroll. The first particle created in preroll was
created at a time of 0.0. By the time the anim begins, it has
aged to a value of 1.0, so it expires and is replaced with a new
particle. In this example, since the preroll path and the regular
path for the fountain are the same, it is created at the exact
position that the old one expired. Let's verify this.
Set the attach point to some point on the circular path. Use the
freehand poly tool to draw a simple triangle of any shape from
here. Make this triangle a path and turn on the movement status
and last segment. Assign the fountain to this new path. Now what
you have is the fountain preroll path setting up the pattern you
have seen, and the triangle moving the fountain during the anim.
Preview this. It will become immediately apparent that as the
particles set up in preroll age and die, the new ones are created
along the new path.
Alter the fountain and change the life values to 2.0/2.0,
2.0/2.0 and preview this. Now you see that the preroll path has
moved the fountain during preroll and set up the pattern. During
the regular anim, the triangle path is moving the fountain stem,
but since it has already generated its 200 particles during
preroll and they live long enough to never die during the anim,
they stay in their preroll positions.
Now alter the fountain and turn the Move Type from independent to
grouped and preview. This is obviously a useful method of working
if you want a fountain to set up a pattern and then move the
pattern as a whole during an animation. One aside is important to
mention here. If you wanted to see the pattern being built, then
move the pattern as you just saw, you would have to either do it
as two separate animations, then join them, or use two different
fountains, one to draw the pattern, then the other to move it.
WARNING: Preroll has no abort. When a fountain is prerolling, you
must wait until it is finished. The time varies based on the
number of particles, and the "shortness" of their lifetimes. The
more particles you ask for and the shorter their lifetimes, the
longer the preroll takes.
You have now covered the first two groups we listed. It is time
to look at the render related options, image, size, color, image
rotation, and obscurring.
9: PARTICLE IMAGE:
Choosing a particle image is simply a matter of choosing a
texture list. The texture list member(s) MUST USE A BITMAP.
Procedural textures are not permitted for fountains (or flares)
and will be ignored if they do not use a bitmap. In normal use
you use the flare images provided with the program, or custom
images you have created just for flares and fountains.
You should use a normal type for the members. Others may give
the same results, but are not necessary. The fountains only need
a color component from the members, so just use normal.
You are free to use a previous member with a strength
modification (alpha channel mod) if you want. The texture list
can have as many members as you wish, and will composite nicely.
Keep in mind, however, that since fountains are built up in an
additive manner, you may want to lower the strengths of the
members, as you add more members.
The color slider in the texture control window is treated as the
amount of color in the flare image to replace with the current
member. If it is set to 1.0, the particles will have the color of
the current member, regardless of its previous color. If it is at
0.0, the color contributed by the current member will not be
used. Its strength will still be used, but the color of the
previous member will not be altered. If the previous member had
no strength at an area where this member does have strength, the
base color of the fountain, as read from the attribute list will
be used.
Notice that the particle image bitmap contributes the strength
and color information to the particle. The color is derived from
the bitmap directly (and can be lessened by using the color
slider in the texture member). The strength is based on the
maximum "luma" at each pixel of the bitmap. The luma is the
maximum value of the red, green and blue color components.
10: PARTICLE SIZE:
There are three distinct methods of altering the size of the
rendered particles. The first is a carry over from flare imaging,
the second is by using the bitmap indices in the texture list
members, and the third other has been developed specifically for
the fountains. We will discuss the first and third, since you
already should know about bitmap indices.
The flare carry over method:
These gadgets are the flare width percent, flare height percent,
the relative distance gadget and the Size gadget (a boolean, just
under the frame exit gadget). If the size gadget is set to
"fixed", the values in the flare width/height percent gadgets are
percents of the render screen size. This is almost never used
with fountains, as the 3D nature of the fountain is lost. If the
size gadget is set to "relative", the program images the particle
as though it is a poly of this size in space at the particle's
location. This means you get true parallax and perspective and is
the normal use of the fountain. You then use the flare
width/height to control the aspect ratio of the particle image.
The fountain specific method:
Locate the Size gadgets. There are the now familar orig max/min
and dest max/min, along with their cspline controls. These are
multipliers of the size as set in the flare carry over method.
They give you complete control of the particle image size.
Normal use is to use the flare carry over gadgets at their
default values, then change the multipliers to alter the size of
the particles of the fountain.
WARNING: The larger the particles are, the longer they take to
render. It is quite possible to have particles that are as large
or larger than the screen. If there are a few hundred of these,
it is just like asking the program to average and composite a few
hundred full size pictures, and can take quite a long time. Also,
as the camera gets closer to a particle, it becomes larger on
screen, so even with a normal particle size, it is possible to
have some frames where the camera comes close to particles that
will take significantly longer to render than the ones where the
camera is at more normal distances.
11: PARTICLE COLOR:
In the fountain's simplest use, the particle color comes from the
particle image you are using. However, there are some rather
extensive controls on altering and enhancing this color.
First, if a member of the fountain texture list has its color
slider at full value (1.0), the color of the particle at the
areas of some strength of this member will be the color of the
the member's bitmap. (This can be altered or replaced by
succeeding members in the texture list if they have some strength
in the same area.)
Second, if a member of the fountain texture list has its color
slider at less than full value (less than 1.0), the color of the
particle at the areas of some strength of this member will be the
color of the flare before this member, plus the color value
setting of the member. So if the texture member has some
strength, and the color slider is at no value (0.0), the particle
will have the strength of the texture member, but the color will
be that of the attribute list, or the color modified by a
previous texture member.
If you have the texture list member(s) color sliders set so that
some of the color can be contributed from the attribute list, you
have some specific choices:
First, the fountain will index the attribute list based on the
animation global time. The color of all particles will be that of
the attribute list at the current frame of the animation.
Second, you can turn ON the AtlInd (attribute list independence)
gadget in the top center of the fountain control window. If on,
the fountain will tell each particle that it should go through
the attribute list completely in its lifetime.
If you have the AtlInd on, you can choose to LOCK the particle
into the color it found at the time it was born by depressing the
LOCK gadget under the AtlInd gadget. If a particle is born at
0.1, it will look at the fountains attribute list and set its
color to what the attribute list has at 0.1. This color will then
stay the same throughout the particle's life.
If you have the AtlInd on, you can also choose to RAND(omize) the
particle's color. This is important if all particles are born at
the same time and you want some color differences among them.
12: PARTICLE STRENGTH:
There are three distinct methods of controlling the particle's
strength. The first exists in the texture list member's strength
gadget. The second exists as an overall fountain strength, and
the third exists as orig and dest values for the individual
particles.
First: You can alter the particle strength by lessening the
strength of the texture list member. Normally this strength is
set to 1.0 and the more fountain specific strength gadgets are
used to change the particle's strengths.
Second: Locate the Overall Strength gadgets at the bottom of the
left column. Here you can enter entry/exit strengths for the
fountain and control the rate of change between them with a
cspline. All particles in the fountain will be affected by these
values.
Third: Locate the Strength orig max/min dest max/min gadgets.
Here, using the techniques you have learned in the previous
tutorials, you can alter the strength of individual particles,
over time in the animation, and over the life of an individual
particle.
Keep in mind that it is possible to enter values that are greater
than 1.0. If you set one of the strength values to greater than
1.0, the final value that is to be composited will still be
clamped to 1.0. You can, however, promote an image to fewer
levels of transparency in this manner. This requires significant
understanding, and is not in the range of normal use. For normal
use, set the strength values between 0.0 and 1.0 and use the
csplines to alter the rate of change.
13: PARTICLE IMAGE ROTATION:
Locate the gadgets labeled Img Rot (image rotation). You will
find the set you have gotten used to, with orig max/min and dest
max/min values.
Use the max/min values as you have for the other options. They
are limits to a random assign. The values are in degrees around
the apparent axis of the particle image.
There is another gadget just below this block labeled Auto
Rotate. If this is ON, the particles will automatically rotate so
the "bottom" of the particle image always points toward the
source of the fountain. This rotation is additive to the values
you enter in the rotation gadgets, so you can use both.
14: PARTICLE OBSCURRING:
There are four options that you can use to control how particle
images interact with polygons and the screen in a drawing. Near
the top left of the window are four boolean gadgets labeled ZBuf,
Obscur, SEdges, and ObsTrn.
ZBuf: If this is ON, the program will intermix the particle
images with the polygons in the drawing. This allows polygons to
obscur only a part of a particle image. Note that if the ZBuf
option is on, the particles are not painted as a separate step.
Instead, the drawing will begin immediately (after preroll, if
on) and the calculations and drawing of the fountain are done on
the fly as the scanlines that contain particle images are
rendered.
WARNING: If this option is ON, the program will have to create a
buffer for every scanline that has particle images on it. In
fact, a buffer for every particle image on a particular pixel on
a scanline has to be made and maintained. This can take a LONG
time for all the allocation and initialization, especially if the
particles are all near each other, as at the beginning frame of a
standard fountain set up. In general, you DO NOT WANT TO USE A
LARGE NUMBER OF PARTICLES if you are going to use the ZBuf
option.
Obscur: If this is ON, the program will test each particle
against all the polygons in the drawing. If a particle is behind
a polygon, it will not be imaged. This is akin to the way real
world lens flares behave, and is suitable for almost all fountain
drawings. It is the suggested method of obscurring fountains.
SEdges: If this is ON, the program will test each particle for
being outside the screen boundaries. If it is outside, the image
will not be rendered. If off, the image will render, even if the
particle is off screen.
ObsTrn: If this is ON, the program will test each partile against
all the polygons in the drawing. If a particle is behind a
polygon, it will then test the polygon for its transparency level
(as set in the attributes list, not from opacity maps). If the
poly is transparent, it will lower the strength of the particle
image, reducing it to 0 strength as a square of the transparency.